#!/usr/bin/env python
# -*- coding:utf-8 -*-


from scrapy.contrib.downloadermiddleware.useragent import UserAgentMiddleware


class UserAgent(UserAgentMiddleware):
    def process_request(self, request, spider):
        ua = 'Mozilla/5.0 (X11; Fedora; Linu…) Gecko/20100101 Firefox/57.0'
        request.headers.setdefault('User-Agent', ua)
        
